<template>
    <div>
        <div class="bg">
            <van-image width="270" height="270" src="https://img2.doubanio.com/view/photo/s_ratio_poster/public/p480747492.jpg" alt="" round />
            <button @click="handleLogout">退出登录</button>
        </div>
        <div>
            <van-tabs v-model="active">
                <van-tab title="收藏夹"  to="/center/collectlists">
                    
                </van-tab>
                <van-tab title="历史记录" to="/center/historylists">
                    
                </van-tab>
            </van-tabs>
        </div>
        <router-view />
    </div>
</template>

<script>

    export default {
        data(){
            return{
                active:0,
            }
        },
        methods: {
            handleLogout(){
            this.$http.post("/m1/logout").then(res=>{
                console.log(res)
                this.$router.push("/")
            })
            }
        },
        
    }
</script>

<style scoped>
.bg{
    background: orangered;
    width: 100%;
    height: 150px;
    font-size: 16px;
    display: flex;
    align-items: center;
    color: #333;
}
</style>